/**
 * 
 */
package modelo;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @author elizabeth
 *
 */
public class Cliente extends Pessoa {

	/**
	 * 
	 */
	 long codigo;
	/**
	 * 
	 */
	 String nome;
	/**
	 * 
	 */
	 String senha;
	/**
	 * 
	 */
	 String cpf;

	public long getCodigo() {
		return codigo;
	}

	public void setCodigo(long codigo) {
		this.codigo = codigo;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getSenha() {
		return senha;
	}

	public void setSenha(String senha) {
		this.senha = senha;
	}

	public String getCpf() {
		return cpf;
	}

	public void setCpf(String cpf) {
		this.cpf = cpf;
	}

	/**
	 * 
	 */
	public Cliente() {
		// TODO Auto-generated constructor stub
	}

	public boolean cadastrarClientes (String login, String pass) {
		try{
			FileWriter fw = new FileWriter("C:/Users/elizabeth/git/loja.virtual.ifpb/LojaVirtual/WebContent/WEB-INF/senha",true);
			BufferedWriter bw = new BufferedWriter(fw);
			bw.write(login);bw.write("=");bw.write(pass);	
			bw.newLine();
			bw.flush();
			bw.close();
			return true;
		} catch (IOException e){
			e.printStackTrace();
			return false;
		}

}

}
